Integrate[Integrate[((D-r*Cos[theta])*Sin[theta]*r^2)/((r^2 + D^2 - 2*r*D*Cos[theta])^(3/2)), {r, 2*rh*Cos[theta], R}], {theta, 0, Pi/2}]